#include<iostream>
using namespace std;
int m,n,t,k;
char a[30],b[30];
char ans[66];
int fa[66];
int main(){
    cin>>m>>n;k=m+n;
    for(int i=m;i>=1;--i)cin>>a[i];
    for(int i=1;i<=n;++i)cin>>b[i];
    for(int i=1;i<=m;++i)ans[i]=a[i],fa[i]=1;
    for(int i=m+1;i<=k;++i)ans[i]=b[i-m],fa[i]=2;
    cin>>t;
    for(int i=1;i<=t;++i){
        int j=1;
        while(j<k){
            if(fa[j]==1&&fa[j+1]==2){
                swap(ans[j],ans[j+1]);
                swap(fa[j],fa[j+1]);
                ++j;
            }
            ++j;
        }
    }
    for(int i=1;i<=k;++i)
        cout<<ans[i];
    cout<<endl;
    return 0;
}
